package com.c1g19.service.common;

import java.sql.Connection;
import java.util.Map;

import org.apache.commons.dbutils.DbUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.MapHandler;
import org.apache.log4j.Logger;

import com.c1g19.dao.common.UserDao;
import com.c1g19.utils.BasicRowProcessorFix;
import com.c1g19.utils.DbControl;

public class UserService {

	private static final Logger logger = Logger.getLogger(UserService.class);
	private UserDao userDao;
	private QueryRunner queryRunner = new QueryRunner();

	/**
	 * 根据用户名和密码返回存储了用户基本信息的Map
	 * 
	 * @param username
	 *            用户名
	 * @param password
	 *            密码
	 * @return 用户信息
	 */
	public Map<String, Object> userLogin(String username, String password) {
		userDao = new UserDao();
		Map<String, Object> userMap = userDao.getUser(username, password);
		return userMap;
	}

}
